package cz.library.database;

public class DatabasePool {

    Database[] mDatabases;

    public DatabasePool(int number) {
        mDatabases = new Database[number];
        for (int i = 0; i < number; i++) {

            mDatabases[i] = new Database();
        }
    }

    public void Close() {
        for (int i = 0; i < mDatabases.length; i++) {
            mDatabases[i].Close();
        }
    }

    public int Count() {
        return mDatabases.length;
    }

    public Database GetDatabase(int i) {
        return mDatabases[i];
    }
}
